package com.fram.service.api.v1.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fram.common.canstant.ErrCode;
import com.fram.common.exception.ProAffairException;
import com.fram.common.exception.ProRunTimeException;
import com.fram.entity.UserFeedback;
import com.fram.mapper.UserFeedbackMapper;
import com.fram.service.api.v1.UserFeedbackService;

/**
 * @作者： 陳曉鬆 @时间： 2020年11月12日 - 上午9:48:37 @description：->
 */
@Service("userFeedbackService")
public class UserFeedbackServiceImpl implements UserFeedbackService {

	@Autowired
	private UserFeedbackMapper userFeedbackMapper;

	@Override
	@Transactional
	public void add(UserFeedback request) throws ProAffairException {
		if (userFeedbackMapper.insertSelective(request) <= 0) {
			throw new ProRunTimeException(ErrCode.FAIL.getReturnCode(), ErrCode.FAIL.getReturnMsg());
		}
	}
}
